import request from '@/utils/request';

// 新增商品接口
export const addGoods = (data) => {
  return request({
    url: '/points/goods/add',
    method: 'POST',
    data
  });
};

// 查询商品分页接口
export const getGoodsPage = (params) => {
  return request({
    url: '/points/goods/page',
    method: 'GET',
    params
  });
};

// 更新商品接口
export const updateGoods = (id, data) => {
  return request({
    url: `/points/goods/update/${id}`,
    method: 'PUT',
    data
  });
};

// 删除商品接口
export const deleteGoods = (id) => {
  return request({
    url: `/points/goods/delete/${id}`,
    method: 'DELETE'
  });
};